﻿using AutoMapper;
using B.S.DataBase.MyProject.Domain.ArrivalCheck;
using B.S.DataBase.MyProject.Domain.BOM;
using B.S.DataBase.MyProject.Domain.Clients;
using B.S.DataBase.MyProject.Domain.Materials;
using B.S.DataBase.MyProject.Domain.procedure;
using B.S.DataBase.MyProject.Domain.Procurements;
using B.S.DataBase.MyProject.Domain.productionworkorder;
using B.S.DataBase.MyProject.Domain.Sales;
using B.S.DataBase.MyProject.Domain.Storages;
using B.S.DataBase.MyProject.Domain.Tickettoticket;
using B.S.DataBase.MyProject.Domain.Vendors;
using B.S.DataBase.MyProject.Domain.WhereHorse;
using T.E.ERP.Write.API.Applicantions.Command.ApprovalCommand;
using T.E.ERP.Write.API.Applicantions.Command.BOMCommand;
using T.E.ERP.Write.API.Applicantions.Command.CheckCommand;
using T.E.ERP.Write.API.Applicantions.Command.CientsCommand;
using T.E.ERP.Write.API.Applicantions.Command.InvoicesandCommand;
using T.E.ERP.Write.API.Applicantions.Command.MaterialsCommand.MaterialsCommand;
using T.E.ERP.Write.API.Applicantions.Command.ProcurementsCommand;
using T.E.ERP.Write.API.Applicantions.Command.PurchaseInStroeCommand;
using T.E.ERP.Write.API.Applicantions.Command.SalesCommand;
using T.E.ERP.Write.API.Applicantions.Command.StoragesCommand;
using T.E.ERP.Write.API.Applicantions.Command.VendorsCommand;
using T.E.ERP.Write.API.Applicantions.Command.ZJWorkOrderCommand;
namespace T.E.ERP.Write.API
{
    /// <summary>
    /// 映射
    /// </summary>
    public class AutoMapperFilePro:Profile
    {
        public AutoMapperFilePro()
        {
            //仓库管理
            CreateMap<AddWhereHorseCommand, BaseStorage>();
            //客户档案
            CreateMap<AddClientsCommand, CustomerProfiles>();
            CreateMap<AddInvoicingInforCommand, InvoicingInformation>();
            //采购发票
            CreateMap<AddPurchaseInvoicesCommand, PurchaseInvoice>();
            CreateMap<Material_BasicAddCommand, Material_BasicModel>().ReverseMap();
            CreateMap<EditPurchaseInvoicesCommand, PurchaseInvoice>().ReverseMap();
            //采购退货单
            CreateMap<AddPurchaseArrivalCommand, Preturnorder>();
            CreateMap<UpdPurchaseArrivalCommand, Preturnorder>();
            //采购入库单
            CreateMap<AddPurchaseInStoreCommand, PurchaseInRepository>();


            //物料分类
            CreateMap<MaterialCategoryAddCommand, MaterialCategoryModel>().ReverseMap();


            //物料基本档
            CreateMap<Material_BasicAddCommand, Material_BasicModel>().ReverseMap();
            


            //原料供应商
            CreateMap<AddMateriCommand, MaterialSupplier>().ReverseMap();


            //开票通知单
            CreateMap<InvoiceSettlementEntityAddCommand, InvoiceSettlementEntity>().ReverseMap();
            //发货通知单
            CreateMap<AddDeliveryNoticeCommand, DeliveryNotice>().ReverseMap();


            //采购订单添加
            CreateMap<AddPurcersCommand, Purchaseorder>().ReverseMap();
            CreateMap<AddPurcersCommand, Materials_Info>().ReverseMap();
            //到货质检添加
            CreateMap<AddArrivalCheckCommand, ArrivalCheck>().ReverseMap();
            //质检记录添加
            CreateMap<AddCheckRecordCommand, CheckRecord>().ReverseMap();

            //采购到货添加
            CreateMap<AddPurcArrivalCommand, PurchaseArrival>().ReverseMap();

            //BOM信息表
            CreateMap<AddBomInfoCommand, BomInfo>().ReverseMap();
            //BOM配件
            CreateMap<AddBomInfoCommand, BomParts>().ReverseMap();
            //工艺流程
            CreateMap<ProcessInfoCommand, ProcessInfo>().ReverseMap();


            //开票到票
            CreateMap<AddticketsCommand, Billingder>().ReverseMap();

            //销售订单
            CreateMap<AddticketsCommand, OrdersSele>().ReverseMap();


            //开票到票
            CreateMap<AddicetsCommand, Billingder>().ReverseMap();
            
            //采购订单
            CreateMap<AddicetsCommand, urchaseOrdp>().ReverseMap();
            //Bom工单物料
            CreateMap<AddBomPartsCommand, BomParts>().ReverseMap();


            //Bom工单物料
            CreateMap<ApprovalTrailCommand, ApprovalTrail>().ReverseMap();
            //质检管理
            CreateMap<ZJWorkOrderAddCommand, QualityInspectionWorkOrder>().ReverseMap();


        }
    }

    
}
